<div ng-controller="UnTreatedController">
    <div class="search mt15 clearfix">
        <div style="width:113px" class="fl">
            <div ui-combobox data="search.fieldList" text-field="text" value-field="value"
                 ng-model="search.search_field"></div>
        </div>
        <input type="text" name="" class="input-text mr5 fl" value="" ng-model="search.keyword"
               ng-enter="getSearchData()" style="width: 350px;">
        <button class="btn" ng-click="getSearchData()">搜索</button>
    </div>


    <div class="checkbox-wrap mt20 clearfix">
        <span class="broker-text">经纪人身份：</span>

        <div class="broker-list">
            <a href="javascript: void(0);" ng-repeat="item in brokerIdentity"
               ng-class="{'selected': selectedBrokerIdentity == item.value}"
               ng-click="changeBrokerIdentity($event, item.value,item)">{{item.text}}</a>
        </div>
    </div>
    <!-- tips -->
    <div id="tips" ng-show="!!owerCompanys.length">
        <div class="tips-wrap">
            <i class="tips-arrow" style="margin-left: 296px;"></i>

            <div class="tips-con clearfix">
                <!-- 列表项 -->
                <div style="display:block">
                    <div class="fl">
                        <div class="checkbox">
                            <input type="checkbox" id="cb_owerCompanys_All"
                                   class="ng-pristine ng-untouched ng-valid" ng-model="owerCompanyCheckAll"
                                   ng-change="updateOwerCompanyCheckAll()">
                            <label for="cb_owerCompanys_All">全部</label>
                        </div>
                    </div>
                    <div class="tips-list clearfix">
                        <label class="checkbox" ng-repeat="item in owerCompanys">
                            <input type="checkbox" ng-change="updateOwerCompanyCheck(item)"
                                   ng-model="item.checked">
                            <span ng-bind="item.text"></span>
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="mt20 clearfix">
        <span class="fl lh30">申诉时间：</span>

        <div class="fl clearfix ng-scope">

            <input type="text" class="input-text input-data fl ng-pristine ng-valid ng-touched" readonly=""
                   ui-date="" format="yyyy-MM-dd" id="start_date" max-date="#F{$dp.$D(\'end_date'\)}" ng-model="filter.startDate">
            <span class="fl lh30">&nbsp;&nbsp;-&nbsp;&nbsp;</span>
            <input type="text" class="input-text input-data fl ng-pristine ng-untouched ng-valid"
                   readonly="" id="end_date" min-date="#F{$dp.$D(\'start_date'\)}" ui-date="" format="yyyy-MM-dd" ng-model="filter.endDate">
            <a href="javascript: void(0)" class="btn fl mlr5" ng-click="getFilterData()">查询</a>
            <a href="javascript: void(0)" class="btn btn-gray fl" ng-click="filter.clearFilter()">撤销筛选</a>
        </div>
    </div>


    <div class="table-header mt20 clearfix">
        <span class="fl lh30 f14">经纪人列表</span>

        <div class="fr btn-group">

            <a href="javascript: void(0)" class="btn btn-yellow  permission p-50032202-00"
               ng-click="exportData($event)">导出</a>
        </div>
    </div>
    <div id="grid" class="table-wrap mt10">
        <table width="100%">
            <thead>
            <tr>
                <th height="34" width="50">
                    <div class="text-center">
                        序号
                    </div>
                </th>
                <th width="150">注册时间</th>
                <th width="100">经纪人信息</th>
                <th width="150">证件号码</th>
                <th width="100">身份信息</th>
                <th width="120">客户信息</th>
                <th width="100">项目</th>
                <th width="180">申诉理由</th>
                <th width="60">操作</th>
            </tr>
            </thead>
            <tbody ng-if="loading">
            <tr height="60">
                <td colspan="9">加载中...</td>
            </tr>
            </tbody>
            <tbody ng-if="!loading && list && list.length>0">
            <tr ng-repeat="item in list"
                ng-mouseover="item.hover = true"
                ng-mouseleave="item.hover = false">
                <td height="80">
                    <div class="text-center">
                        {{filter.pageSize*(pageIndex-1)+$index+1}}
                    </div>
                </td>
                <td><p>{{item.broker.reg_date}}</p></td>
                <td>
                    <p>
                        {{item.broker.broker_name}}({{item.broker.gender}})
                    </p>

                    <p>{{item.broker.mobile_tel}}</p>
                </td>
                <td>
                    <p>
                        {{item.broker.cre_no}}
                    </p>
                </td>
                <td>
                    <p>
                        {{item.broker.capacity_des_info}}
                        {{item.broker.belongs_company_info}}
                    </p>
                </td>
                <td>
                    <p>{{item.cst_name}}({{item.cst_gender}})</p>
                    <p>{{item.cst_mobile_tel}}</p>
                </td>
                <td>
                    <p>

                        {{item.project_name}}
                    </p>

                </td>
                <td>
                    <p>{{item.appeal_detail}}</p>
                </td>
                <td>
                    <p ng-show="item.hover">
                        <a href="javascript: void(0)" class="c-orange permission p-50032202-01"
                           ui-dialog="申诉处理"
                           ui-dialog-data="item"
                           ui-dialog-show="ComplaintBtn($data,$dialog,$dialogScope,$result_status)"
                           ui-dialog-url="inc/dialog/deal_complaint.html">申诉处理</a>
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" ng-if="!loading && (!list || list.length==0)" style="height: auto">
            <span>暂无数据</span></div>
    </div>
    <div ui-pagination page-index="pageIndex" page-size="filter.pageSize" total="total"
         changed="getBrokerData($pageIndex)"></div>
</div>